package com.campus.service.Impl;

import com.campus.domain.Dto.ClassCreateDto;
import com.campus.domain.Dto.ClassUpdateDto;
import com.campus.mapper.ClassMapper;
import com.campus.service.IClassService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class ClassServiceImpl implements IClassService {

    @Autowired
    private ClassMapper classMapper;


    @Override
    public Integer addClass(ClassCreateDto classCreateDto) {
        return classMapper.addClass(classCreateDto);
    }

    @Override
    public Integer updateClass(ClassUpdateDto classUpdateDto) {
        return classMapper.updateClass(classUpdateDto);
    }

    @Override
    public Integer allocateTeacher(Long classId, Long teacherId) {
        return classMapper.allocateTeacher(classId,teacherId);
    }

    @Override
    public Integer addStudentInClass(Long classId, Long studentId) {
        return classMapper.addStudentInClass(classId,studentId);
    }
}
